package clsr.info.blog.web.controller;

import clsr.info.blog.common.api.ITagService;
import clsr.info.blog.common.entity.Tag;
import clsr.info.blog.common.pojo.JsonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/tag")
public class TagController {

  @Autowired public ITagService tagService;

  @RequestMapping("/loadTags")
  public JsonResponse<List<Tag>> loadTags(Integer classifyId) {
    List<Tag> tags = tagService.loadTags(1, classifyId);
    return JsonResponse.success(tags);
  }
}
